package com.xuanrui.pubInter;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author sunke
 * @Date 2019/11/13 14:48
 * @description
 */

@AllArgsConstructor
@NoArgsConstructor
public class DecoratePageList<T> {


    public static DecoratePageList nullList(int pageSize) {
        DecoratePageList data = new DecoratePageList();
        PageBean page = new PageBean();
        page.setCurrentPage(1);
        page.setPageSize(pageSize);
        data.setPage(page);
        return data;
    }

    public static DecoratePageList nullList(PageBean page) {
        DecoratePageList data = new DecoratePageList();


        data.setPage(page);
        return data;
    }


    public static DecoratePageList nullList() {
        DecoratePageList data = new DecoratePageList();


        data.setPage(new PageBean());

        return data;
    }

    private List<T> list;
    private PageBean page;

    public List<T> getList() {
        return list;
    }

    public DecoratePageList<T> setList(List<T> list) {
        this.list = list;
        return this;
    }

    public PageBean getPage() {
        return page;
    }

    public DecoratePageList<T> setPage(PageBean page) {
        this.page = page;
        return this;
    }
}
